package com.oocl.scan.utils;

import com.alibaba.fastjson.JSONArray;
import java.util.List;
import java.util.concurrent.ConcurrentLinkedQueue;

public class JsonUtil<T> {

  public static <T> String convertObject(List<T> list) {
    JSONArray json = (JSONArray) JSONArray.toJSON(list);
    return json.toJSONString();
  }

  public static <T> String convertObject(ConcurrentLinkedQueue<T> list) {
    JSONArray json = (JSONArray) JSONArray.toJSON(list);
    return json.toJSONString();
  }
}
